<?php
namespace app\index\controller;
use think\Controller;
use app\index\model\Nr;
    class Web extends Controller
    {
        public function book(){
            header("Access-Control-Allow-Origin:localhost:8080");
            $data['name']="liu";
            $data['pass']="yong";
            return json($data);
        }
		public function view(){
			 header("Access-Control-Allow-Origin:http://localhost:8080");
			 //http协议localhost地址8080端口
			$name=input("post.name","五千年的树哥");
			$n=new Nr();
			return $n->view($name);
		}
    }